<%@ include file="../layout/taglib.jsp" %>
 <div class="content-top">
			<div class="wrap">
				 
				<div class="section group">
				 <div class="col span_2_of_contact">
				  <div class="contact-form">
				  	<h3>${unit.title}</h3>
				  	     <div>
						    <span>${unit.title}</span>
						</div>
					    <div>
						    <span>${unit.description}</span>
						</div>
						<div> 
						    <c:if
							test="${not empty sessionScope.userFLogin and not empty unit.uri_youtube}">
							 <iframe src="${unit.uri_youtube}" width="560" height="315"
								frameborder="0" allowfullscreen></iframe>
							</c:if>
						  
						</div>
						
						
						
						
					</div>
					
					<div>
					   <c:if test="${not empty sessionScope.userFLogin and not empty listquest}">
						<div>
							<form action="../../../listTest/saveTest" method="POST">
							   <input type="hidden" value="${unit.idUnit}" name="idtest"/>
								<ul class="list3">
									<c:forEach items="${listquest}" var="quest">
										 <li>
											<div class="extra-wrap1">
												<p>${quest.questContent}</p>
												
													<div class="row">
													  <div class="col-lg-6">
													    <div class="input-group">
													      <span class="input-group-addon">
													      <c:choose>
													        <c:when test="${not empty view_correction and quest.answer eq 1}">
													           <input type="radio" id="choice${quest.qestId}_1" name="choice${quest.qestId}" aria-label="..." value=1 checked>
													        </c:when>
													        <c:otherwise>
													           <input type="radio" id="choice${quest.qestId}_1" name="choice${quest.qestId}" aria-label="..." value=1>
													        </c:otherwise>
													      </c:choose>
													         <label for="answer" class="control-label">${quest.collect1}</label>
													      </span>
													      </div>
													  </div>
													</div>
												
												  <div class="row">
													  <div class="col-lg-6">
													    <div class="input-group">
													      <span class="input-group-addon">
													        <c:choose>
													        <c:when test="${not empty view_correction and quest.answer eq 2}">
													           <input type="radio" id="choice${quest.qestId}_2" name="choice${quest.qestId}" aria-label="..." value=2 checked>
													        </c:when>
													        <c:otherwise>
													           <input type="radio" id="choice${quest.qestId}_2" name="choice${quest.qestId}" aria-label="..." value=2>
													        </c:otherwise>
													      </c:choose>
													       
													        <label for="answer" class="control-label">${quest.collect2}</label>
													      </span>
													    </div>
													  </div>
													</div>
													
													<div class="row">
													  <div class="col-lg-6">
													    <div class="input-group">
													      <span class="input-group-addon">
													        <c:choose>
													        <c:when test="${not empty view_correction and quest.answer eq 3}">
													           <input type="radio" id="choice${quest.qestId}_3" name="choice${quest.qestId}" aria-label="..." value=3 checked>
													        </c:when>
													        <c:otherwise>
													           <input type="radio" id="choice${quest.qestId}_3" name="choice${quest.qestId}" aria-label="..." value=3>
													        </c:otherwise>
													      </c:choose>
													        <label for="answer" class="control-label">${quest.collect3}</label>
													      </span>
													    </div>
													  </div>
													</div>
													
													<div class="row">
													  <div class="col-lg-6">
													    <div class="input-group">
													      <span class="input-group-addon">
													        <c:choose>
													        <c:when test="${not empty view_correction and quest.answer eq 4}">
													           <input type="radio" id="choice${quest.qestId}_4" name="choice${quest.qestId}" aria-label="..." value=4 checked>
													        </c:when>
													        <c:otherwise>
													           <input type="radio" id="choice${quest.qestId}_4" name="choice${quest.qestId}" aria-label="..." value=4>
													        </c:otherwise>
													      </c:choose>
													        <label for="answer" class="control-label">${quest.collect4}</label>
													      </span>
													    </div>
													  </div>
													</div>
												
											</div>
										</li>
									</c:forEach>
							     </ul>
							     <div>
									<span><input type="submit" value="<t:message code="send"/>" ></span>
							     </div>
							</form>
						</div>
					</c:if>
					</div>
  				</div>
				<div class="col span_1_of_contact">
				  <div class="company_address">
				     	<h3><t:message code="course_information"/> :</h3>
						    	<p><div class="boxImage"><img src="<%=request.getContextPath()%>/photoCorfront/${course.idCourse}" alt="${course.nomPhoto}"/></div></p>
						   
						<p><t:message code="length"/>: ${course.minutes} minutes</p>
				   		<p><t:message code="teacher"/>:
				   				<a href="<%=request.getContextPath()%>/viewUser?id=${course.teacher.idUser}">  
				   					${course.teacher.firstName} 
				   				</a>
						</p>
				 	 	<p><t:message code="start_date"/> : <span>${fn:substring(course.dateStart, 0, 10)}</span></p>
				 	 	
				 	 	
				   </div>
				 </div>
				 <div class="clear"></div>
			  </div>
			</div>
	</div>
	<script type="text/javascript">
	$(document).ready(function() {

		$("#unit").click(function() {
			window.location = $(this).find("a").attr("href");
			return false;
		});

	});
	</script>